package no.ntnu.fp.client.exceptions;

import java.io.IOException;

@SuppressWarnings("serial")
public class NetworkException extends RuntimeException {
	
	public NetworkException(String message, IOException cause) {
		super(message, cause);
	}

	public IOException getCause() {
		return (IOException)super.getCause();
	}
	
	@Override
	public String getLocalizedMessage() {
		return "Network exception:\n" + super.getLocalizedMessage() + 
		"\n\nCause: " + getCause().getLocalizedMessage();
	}
}
